package ai.people.netmon.framework.domain.graph.tags;

import ai.people.netmon.framework.domain.archives.annotation.CheckEmpty;
import ai.people.netmon.framework.domain.graph.BaseTag;
import com.alibaba.fastjson.PropertyNamingStrategy;
import com.alibaba.fastjson.annotation.JSONType;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * 电话号码tag
 *
 * @author zhenglin
 * @date 2022/4/25
 */
@Data
@NoArgsConstructor
@JSONType(naming = PropertyNamingStrategy.SnakeCase)
public class PhoneTag extends BaseTag {
    /**
     * 号码
     */
    @CheckEmpty(message = "电话号码不能为空")
    @NotBlank(message = "电话号码不能为空")
    private String number;

    public PhoneTag(String phoneNumber) {
        this.number = phoneNumber;
    }

}
